<?php

define('IN',1);

require_once 'common.inc.php';


$rows = $_ENV['db']->fetchAll("SELECT * FROM lunbo");


$xml = "<?xml version='1.0' encoding='utf-8'?><data><language linkBtnUrl='' />";

$i = 0;
foreach ((array)$rows as $k=>$item) {
    $xml .= '<item fileType="IMAGE" duration="8000" URL="/attach/'.$item['pic'].'" linkURL="'.$item['link_url'].'" target="_blank" gameid="'.uniqid().'" index="'.$i.'"><thumbnail URL="" type="NOTICE" description1="" description2="" /><title><![CDATA[]]></title>
    <description><![CDATA[]]></description></item>';
    $i++;
}

$xml .= '</data>';


header("Content-type:text/xml; charset=utf-8");
echo $xml;